RMS detector with automatic gain control

ABSTRACT

Embodiments of the present invention provide systems, devices and methods for detecting the RMS value of a signal. The RMS detector uses multiple variable-gain stages and internal gain control to generate an RMS output signal based on an arbitrary signal input. This RMS detector significantly reduces the signal swings seen on a squarer within prior art RMS detectors and reduces the detector&#39;s dependency on DC offsets at low signal levels and overload errors at high signal levels. The embodiments of the present invention also improve the accuracy of the RMS detector within large dynamic signal ranges by obviating the operation of a squarer in saturation or out of the squaring region. Accordingly, embodiments of the present invention are able to more accurately detect RMS values on a signal, operate over relatively higher signal ranges, and better function within different signal modulation schemes, particularly those with large peak-to-average ratios.

CROSS REFERENCE TO RELATED PATENT APPLICATIONS

This application is a divisional application of and claims priority toU.S. patent application Ser. No. 12/123,198, entitled “RMS Detector withAutomatic Gain Control,” filed May 19, 2008 now U.S. Pat. No. 7,994,840.

BACKGROUND

A. Technical Field

The present invention relates generally to root-mean-square(hereinafter, “RMS”) detectors, and more particularly, to theimplementation of a true RMS detector comprising multiple variable-gaincontrol stages utilizing automatic variable-gain control relating tochanges in an input RF signal.

B. Background of the Invention

Various structures and methods are available for the detection andmeasurement of voltage and/or power on a radio-frequency (“RF”) signal.RMS detection is an example of a method for detecting and quantifying apower or voltage level over a complete cycle of a sinusoidal signal. Inmany instances, RMS detection is preferred over peak detection becauseit is a more accurate measurement of the RF power in an alternatingcurrent or voltage signal.

RMS detectors function by squaring an input signal, taking an average ofthe squared signal over a period of time on the signal, and thensquare-rooting this average. FIG. 1 illustrates an exemplary prior artRMS detector, which detects an RMS voltage of an incoming signal. Theincoming signal 110 is received at an input on a voltage squarer 120that squares the signal 110. Depending on the design of the detector,the squarer 120 may also scale the signal by a scaling factor (K) andgenerate an output voltage (V₁) 125. It is important to note that thevoltage swings on the output voltage (V₁) 125 are related to the squaredvalue of the voltage swings on the input signal 110 as shown below.V ₁ =KVi ²

Because of the squaring function of the squarer 120, voltage variationson the input signal 110 are greatly amplified and may result in verylarge variations in the squarer output voltage (V₁) 125. These largevoltage variations on the squarer output voltage (V₁) 125 may createsignificant noise offset issues on the low end of the signal andoverload problems on the top end of the signal. Accordingly, a squarermay be forced to operate outside of its squaring region, which couldeffectively clip the output voltage 125 at the high end of the signal aswell as cause the squarer to lose its squaring functionality andgenerate distortion on the squared signal in response to certain inputsignals and modulation schemes.

The squarer output voltage (V₁) 125, and the distortions therein, areprovided to an RC circuit 130 that averages this output voltage 125 overa particular cycle of the signal. This averaged or mean value (V₂) 135of the squarer output voltage (V₁) 125 is shown below:V ₂ =K Vi²

This mean value (V₂) 135 is provided as a first input on a gain block140 that is coupled across a square-rooter 150. The output (V₃) 155 ofthe square-rooter 150 is provided as a second input on the gain block140. This gain block 140 effectively forces the square-rooter output(V₃) 155 to be equal to the mean value (V₂) 135. Accordingly, thisoutput (V₃) 155 on the square-rooter 150 is defined as:V ₃ =KV _(o) ² =V ₂ =K V ₁ ²

This relationship between the square-rooter output (V₃) 155 and the meanvalue (V₂) 135 results in an output of the gain blocker 140 being theRMS value of the input signal 110 and defined as:V _(o)=√{square root over ( V ₁ ²

As discussed above, the RMS detector in FIG. 1 is limited in the typesof signals that it can properly process. This limitation prevents thistype of RMS detector from properly functioning in certain types ofcommunication systems that use modulation schemes that generate largepeak-to-average ratios on the signal.

Accordingly, what is needed is an RMS detector that is able to functionwithin more diverse types of communication systems including thosesystems that employ modulation schemes that generate largepeak-to-average ratios on a signal.

SUMMARY OF THE INVENTION

Embodiments of the present invention provide systems, devices andmethods for detecting the RMS value of a voltage or current signal. TheRMS detector uses multiple variable-gain stages and internal gaincontrol to generate an RMS voltage or current output related to an RFsignal input. This RMS detector significantly reduces the voltage orcurrent swings seen on a squarer within prior art RMS detectors andreduces the detector's dependency on noise offsets at low signal levelsand overload distortion at high signal levels. These embodiments of thepresent invention effectively improve the accuracy of the RMS detectorwithin large dynamic signal ranges by obviating the operation of asquarer in saturation or outside of its squaring region and avoidingdistortions caused thereby. Accordingly, embodiments of the presentinvention are able to more accurately detect RMS values on a signal,operate over relatively higher voltage or current ranges, and functionaccurately within a diverse set of signal modulation schemes.

In certain embodiments of the invention, an RF signal is provided to anRF variable-gain amplifier that applies a variable gain to the RF signalthat forces an output to be constant or approximately constant. Thisconstant output may be amplified so that the resulting signal fallswithin a preferred squaring region of a squarer, which squares theoutput. The squared output is averaged over a period of time resultingin an averaged, squared output that is also forced to be constant. Again block forces this averaged, squared output to be equal to areference voltage by generating an output that is used to define a firstgain adjustment on the RF variable-gain amplifier, which effectivelycreates a feedback loop that changes the gain on the RF variable-gainamplifier relative to voltage changes on the RF signal.

A second gain adjustment is generated from the output on the gain blockthat controls the gain across a DC variable-gain amplifier. This secondgain adjustment also relates to signal level changes on the RF signal.The DC variable-gain amplifier output is also forced to be a constant bythis second gain adjustment and is provided on an input of a second gainblock. The second gain block forces the output on the DC variable-gainamplifier to be equal to a reference voltage by outputting a signal on afeedback loop that is provided on an input of the DC variable-gainamplifier. This output from the second gain block is proportional to anRMS voltage of the RF signal and may be scaled, in certain embodimentsof the invention, to identify the true RMS voltage of the RF signal.

In other embodiments of the invention, an RMS detector uses currentoperations that define the same gain adjustment signals on an RFvariable-gain amplifier and a DC variable-gain amplifier to generate asignal from which a true RMS voltage may be defined. In theseembodiments, the large signal swings in the squarer are significantlyreduced by forcing the signal levels at the outputs of the variable-gainamplifiers, squarer and averager to constant values, even though the RFinput signal level may take on a wide range of values.

In yet other embodiments of the invention, components and modules withinembodiments of the RMS detector comprise novel and non-obviousstructures and functionality that improves the performance and operationthereof.

Certain features and advantages of the present invention have beengenerally described in this summary section; however, additionalfeatures, advantages, and embodiments are presented herein or will beapparent to one of ordinary skill in the art in view of the drawings,specification, and claims hereof. Accordingly, it should be understoodthat the scope of the invention shall not be limited by the particularembodiments disclosed in this summary section.

BRIEF DESCRIPTION OF THE DRAWINGS

Reference will be made to embodiments of the invention, examples ofwhich may be illustrated in the accompanying figures. These figures areintended to be illustrative, not limiting. Although the invention isgenerally described in the context of these embodiments, it should beunderstood that it is not intended to limit the scope of the inventionto these particular embodiments.

FIG. 1 illustrates a prior art RMS detector in which potentially largevoltage or current swings may occur as the input RF signal level takeson a wide range of values.

FIG. 2 is a general illustration of an RMS detector according to variousembodiments of the invention.

FIG. 3A is a block diagram of an RMS voltage detector according tovarious embodiments of the invention.

FIG. 3B is a block diagram of another RMS voltage detector according tovarious other embodiments of the invention.

FIG. 4 illustrates an exemplary RMS detector architecture according tovarious embodiments of the invention.

FIG. 5 is a circuit diagram of a variable-gain amplifier in accordancewith various embodiments of the invention.

FIG. 6 is a circuit diagram of a fixed-gain amplifier in accordance withvarious embodiments of the invention.

FIG. 7 is an exemplary squarer according to various embodiments of theinvention.

FIG. 8 is a circuit diagram of a control loop for an RM variable-gainamplifier according to various embodiments of the invention.

FIGS. 9A and 9B are circuit diagrams of exemplary current sources thatmay be used within an RF variable-gain amplifier according to variousembodiments of the invention.

FIG. 10 is a DC variable-gain amplifier in accordance with variousembodiments of the invention.

FIG. 11 is a circuit diagram of a DC buffer according to variousembodiments of the invention.

FIG. 12 is an exemplary logarithmic amplifier according to variousembodiments of the invention.

FIG. 13 illustrates an exemplary circuit for a buffer according tovarious embodiments of the invention.

FIG. 14 is a current-based RMS detector according to various embodimentsof the invention.

FIG. 15 is a current squarer according to various embodiments of theinvention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Embodiments of the present invention provide systems, devices andmethods for detecting an RMS voltage or current (and thus the powerlevel) of an input signal. The RMS detector uses multiple variable-gainstages and automatic gain control feedback that varies in relation tovoltage or current changes in the input signal. Using this relationshipbetween the input signal and the variable-gain-control feedback, anoutput on a variable-gain stage is generated that relates to an RMSvalue of the input signal. This RMS detector significantly reduces thevoltage swings seen on a squarer within prior art RMS detectors andreduces the detector's dependency on voltage offsets at low signallevels and overload distortion at high signal levels. The embodiments ofthe present invention also improve the accuracy of the RMS detector whenprocessing signals which take on a wide range of values by obviating theoperation of a squarer in saturation or out of the squaring region.Accordingly, embodiments of the present invention are able to moreaccurately detect the RMS value of a signal, operate over relativelyhigher signal ranges, and better function with different signalmodulation schemes that may generate signals with large peak-to-averageratios.

In the following description, for purpose of explanation, specificdetails are set forth in order to provide an understanding of theinvention. It will be apparent, however, to one skilled in the art thatthe invention may be practiced without these details. One skilled in theart will recognize that embodiments of the present invention, some ofwhich are described below, may be incorporated into a number ofdifferent electrical components, circuits, devices and systems. Theembodiments of the present invention may function in various differenttypes of environments wherein RMS detection is relevant includinghigh-frequency RF applications. Structures and devices shown below inblock diagram form are illustrative of exemplary embodiments of theinvention and are meant to avoid obscuring the invention. Furthermore,connections between components within the figures are not intended to belimited to direct connections. Rather, connections between thesecomponents may be modified, re-formatted or otherwise changed byintermediary components.

Reference in the specification to “one embodiment” or “an embodiment”means that a particular feature, structure, characteristic, or functiondescribed in connection with the embodiment is included in at least oneembodiment of the invention. The appearances of the phrase “in oneembodiment” in various places in the specification are not necessarilyall referring to the same embodiment.

FIG. 2 generally illustrates a multi-stage variable-gain RMS detector inaccordance with various embodiments of the invention. An RMS value isgenerated from an input signal by controlling gain across variable-gainstages relative to amplitude changes in the input signal. In effect,amplitude changes in the input signal result in changes in thegain-control feedback to the variable-gain stages, which allows an RMSvoltage for the input signal to be extracted from an output of avariable-gain stage. One skilled in the art will recognize that thefunctionality recited within FIG. 2 may be realized using variousdifferent components and designs, and may also include intermediarycomponents between the modules that modify or otherwise change a signalwithin the multi-stage variable-gain RMS detector.

Referring to FIG. 2, an input signal 210 is received by a firstvariable-gain stage 220. In certain embodiments of the invention, thisfirst variable-gain stage 220 comprises a first variable-gain amplifierin which a feedback loop adjusts the gain of this amplifier so that theoutput 225 of the first variable-gain stage 220 is forced constant orapproximately constant (i.e., having relatively small signal levelchanges for various input signal amplitudes). Hereinafter and within theclaims, the term “constant” is intended to include both constant andapproximately constant signal levels. Accordingly, as the amplitude ofthe input signal 210 changes, the first variable-gain stage 220 adjuststhe amount of gain in an attempt to keep the output 225 constant.

This output 225 is provided to a squaring stage 230 and is designed tofall within the optimum squaring region of the squaring stage in orderto reduce the chance of driving the squaring stage 230 into saturationand out of its squaring range. Because the output 225 of the firstvariable-gain stage 220 is continually being forced to a constant level,the squaring stage 230 does not experience large voltage swings on itsinput, which in turn would have generated significantly large voltageswings on its output caused by the squaring operation. Rather, theoutput of the squaring stage 230 is also constant or approximatelyconstant because its input is relatively constant, which allows thesquaring stage 230 to safely operate below saturation. The output 235 onthe squaring stage 230 is provided to an averaging stage 240 that onceagain generates an output 245 that is constant or approximatelyconstant.

The output 245 of the averaging stage is fed back 250 and used, at leastpartially, to control the gain on the first variable-gain stage 220. Oneskilled in the art will recognized that intermediary components may beused within this feedback 250 that modifies the feedback signal prior toeventually controlling the gain on the first variable-gain stage 220.Examples of such components are discussed later within the patentapplication. Using this feedback, a first gain adjustment 255 isgenerated that modifies the gain of the first variable-gain stage 220 inorder to try and force its output 225 to be constant. Stated anotherway, as the input voltage 210 changes, the feedback responds by changinga first gain adjust signal 255 accordingly in an attempt to force thefirst variable-gain stage output 225 to a constant level.

A second variable-gain stage 270 is controlled by a second gainadjustment 260, which is also derived from the feedback 250. Similar tothe first gain adjustment 255, this second gain adjustment 260 alsochanges in relation to voltage changes on the input signal 210. Becauseof the relationship between the second gain adjustment 260 and the inputsignal 210, the changes in the gain across the second variable-gainstage 270 vary in relation to voltage or current changes within theinput signal 210. In particular, changes in gain in the secondvariable-gain stage 270 are generated in relation to theaveraged-squared changes in the input signal 210. Using thisrelationship, the second variable-gain stage 270 generates an output 275that relates to an RMS value of input signal 210. This output 275 maysubsequently be scaled or otherwise modified, for example by a gainblock, to provide an accurate RMS value of the input signal 210.

One skilled in the art will recognize that numerous different circuitimplementations may be used in which internal gain control feedback isused to control the gain across multiple variable-gain stages inrelation to changes within an input signal, and using this relationshipgenerate an RMS value for the input signal. FIGS. 3A and 3B illustratevoltage-based examples of RMS detectors in accordance with variousembodiments of the present invention.

Referring to FIG. 3A, an input signal 310 is received at a firstvariable-gain amplifier 320 that applies a variable-gain on the inputsignal 310, which forces an output (V₁) 325 to be constant. As thevoltage level on the input signal 310 changes, the gain of the firstvariable-gain amplifier 320 will change in response thereto. Thisconstant output 325 is received at a squarer 330 that performs asquaring operation. Because the output (V₁) 325 on the firstvariable-gain amplifier 320 is constant or approximately constant, thevoltage changes on the output (V₂) 335 of the squarer 330 caused bychanges in the input RF signal level are significantly reduced, whichallows the squarer to operate within its squaring region. Accordingly,the output (V₂) on the squarer 330 is equal to:V ₂ =KV ₁ ² =KG _(v) ² V _(i) ²

where G_(v) is the gain of the RF variable-gain amplifier.

The squared output (V₂) 335 is provided to an RC circuit 340 thateffectively averages the squared output 335 over a particular timeperiod. In certain embodiments of the invention, this averaging occursover a full wavelength cycle of the input signal 310. An averagedsquared output (V₃) 345 is generated from the RC circuit 340 and definedas:

$V_{3} = {\overset{\_}{V_{2}} = {{KV}_{1}^{2} = {{{KG}_{v}^{2}\overset{\_}{V_{i}^{2}}\mspace{14mu}{and}\mspace{14mu}{thus}\mspace{14mu} G_{v}} = {\left( \frac{\sqrt{V_{3}}}{\sqrt{K}} \right)\left( \frac{1}{\sqrt{\overset{\_}{V_{i}^{2}}}} \right)}}}}$

This averaged squared output (V₃) 345 is provided to a first input on again block 355. The gain block 355 also receives a reference voltage 350on a second input 350. This reference voltage 350 may be generatedon-chip or from an external source. The gain block 355 generates anoutput feedback signal 360 that attempts to force the reference voltage350 and the averaged squared output 345 to be equal or approximatelyequal. Thus,

$V_{3} = {V_{4} = {{V_{{ref}\; 1}\mspace{14mu}{and}\mspace{14mu} G_{v}} = {\left( \frac{\sqrt{V_{{ref}\; 1}}}{\sqrt{K}} \right)\left( \frac{1}{\sqrt{\overset{\_}{V_{i}^{2}}}} \right)}}}$

The feedback signal is used to generate a first gain adjustment 365 onthe first variable-gain amplifier 320. Accordingly, voltage changes inthe input signal 310 are effectively cycled through the squarer 330, RCcircuit 340, and gain block 355 in such a manner that large voltageswings on these components are not generated, but changes within theinput signal 310 are accounted for within the feedback signal 360 andeventually used to extract an associated RMS value.

A second variable-gain amplifier 375 is used to extract this RMS valuesuch that a second gain adjustment 370 is derived from the feedbacksignal 360 and controls the gain across this second variable-gainamplifier 375. The second variable-gain amplifier 375 generates anoutput (V₆) 380 that is provided on a first input of a second gain block385 and if the first and second variable gain amplifiers are matched,then:V ₆ =G _(v) V _(o)

The averaged squared output (V₃) 345 is provided on a second input ofthe second gain block 385, which forces the second variable-gainamplifier output (V₆) 380 to equal or approximately equal the averagedsquared output (V₃) 345. Thus, V₆=V₃=V_(ref1). In so doing, the secondgain block 385 outputs a signal (V_(o)) 390 that is representative ofthe RMS value of the input signal 310 and which is provided as an inputon the second variable-gain amplifier 375. The output signal (V_(o)) isgiven by:

$V_{o} = {\frac{V_{6}}{G_{v}} = {\frac{V_{{ref}\; 1}}{G_{v}} = {\sqrt{{KV}_{{ref}\; 1}}\sqrt{\overset{\_}{V_{i}^{2}}}}}}$

Depending on the implementation, this output signal (V_(o)) 390 may bescaled or otherwise modified to obtain an accurate measurement of theRMS value of the input signal 310.

One skilled in the art will recognize that the second input on thesecond gain block 385 does not necessarily need to be the averagedsquared output (V₃) 345; rather, any constant voltage may be providedthereon to force the output (V₆) 380 of the second variable-gainamplifier 375 to a constant level. In this scenario, a gain or scalarmay be applied to the output signal 390 to adjust its level in relationto the applied constant voltage on the second input of the second gainblock 385 and the averaged squared output (V₃) 345. FIG. 3B illustratesan example of such a scenario according to various embodiments of theinvention.

Referring to FIG. 3B, a second reference voltage (V₇) 395 is applied tothe second input of the second gain block 385 instead of the averagedsquared output (V₃) 345. This second reference voltage 395 has a knownvalue and its relation to the averaged squared output (V₃) 345 may bedetermined. The output 392 from second gain block 385 still representsthe RMS voltage of the input signal 310, but may differ by a scalingfactor. This scaling factor may be identified based on the transferfunction of the squarer (K) by introducing quantity V_(ref2) defined as:

$K = \frac{1}{V_{{ref}\; 2}}$${{and}\mspace{14mu}{thus}},{V_{o} = {\sqrt{\frac{V_{{ref}\; 1}}{V_{{ref}\; 2}}}\sqrt{\overset{\_}{V_{i}^{2}}}}}$

This scaling factor may be identified by the relationship between thesecond reference voltage 395 and the averaged squared output (V₃) 345 orthe first reference voltage (V₄) 350. Accordingly, a gain may be appliedto this output signal (V_(o)) 390 by amplifier 397 to generate anaccurate RMS value 398 for the input signal 310.

This output (V_(o)) contains less distortion and error than seen onprior art RMS detectors because the squarer was able to exclusivelyoperate within its squaring region and avoid saturation for large RFinputs and noise-related problems for small RF inputs. In particular, byavoiding the large signal level ranges generated in the prior art, theRMS detector discussed above is able to more efficiently and accuratelygenerate an RMS value for an input signal, especially those inputsignals having large peak-to-average ratios.

FIG. 4 illustrates an exemplary RMS detector architecture comprising anRF variable-gain amplifier, DC variable-gain amplifier, and othercomponents according to various embodiments of the invention. An RFinput 410 receives an RF signal at an RF variable-gain amplifier 420 viaAC coupling capacitors 415, 416. In various embodiments, thevariable-gain amplifier 420 comprises differential pair variable-gaincircuits that apply a varying gain to force an output to be constant.These differential-pair variable-gain circuits are AC-coupled viacoupling capacitors 425, 426 to an output 428 that sums the current fromthese differential-pair variable-gain paths.

In certain embodiments, an RF current amplifier 430 applies a fixed gainto the current output 428 and provides the amplified signal to a squarer435 via coupling capacitor 435. This fixed gain adjusts the currentoutput 428 so that the signal falls within an optimum squaring region ofthe squarer 430. The squarer 440 squares the signal by applying anon-linear gain to the signal and provides the squared signal to an RCcircuit that effectively averages the signal over a particular timeperiod.

The RC circuit comprises a resistor 445 coupled to a voltage source(Vcc) and a capacitor 450 coupled to ground. The resulting averaged,squared signal is fed back, via a feedback loop, to control the gainacross the RF variable-gain amplifier 420. Control circuitry 466 isprovided to appropriately control the variable-gain and process thefeedback information.

A DC variable-gain amplifier 460 is also coupled to control circuitry467 that may or may not be integrated within the control circuitrycontrolling the gain of the RF variable-gain amplifier 420. The DCvariable-gain amplifier 460 forces its output to be constant orapproximately constant and buffers the output in a DC current buffer465. In certain embodiments of the invention, an output on the DCcurrent buffer 465 is transmitted on a feedback loop to DC buffer 455,which provides the feedback on an input of the DC variable-gainamplifier 460. The output on the DC buffer 455 may also be an outputrepresentative of an RMS voltage of the input RF signal (V_(i)) 410.

In various other embodiments, a true RMS value in dB may also beprovided such that the output on the DC buffer 455 is provided to alogarithmic amplifier 470 and a buffer 475. Depending on the design ofthe detector, this output may be further scaled to generate a true RMSvalue since the output on the buffer 475 is proportional to the RMSvalue on a dB scale.

FIG. 5 illustrates a RF variable-gain amplifier according to variousembodiments of the invention. The RF variable-gain amplifier 510receives an RF signal at input 515 and generates a current output 520that is provided to a fixed-gain current amplifier 610. The RF input 515is AC-coupled on chip through capacitor (C₁) 525 to resistor (R₂) 530,and through capacitor (C₂) 535 to resistor (R₃) 540. Thesecapacitor-resistor pairs effectively convert the incoming RF signal to afirst AC current I_(i1) and second AC current I_(i2).

The first AC current I_(i1) is defined as:

$I_{i\; 1} = \frac{V_{i}}{R_{2} + Z_{i\; 1}}$

The second AC current I_(i2) is defined as:

$I_{i\; 2} = \frac{V_{i}}{R_{3} + Z_{i\; 2}}$

The first AC current I_(i1) is provided to the common emitter point ofparallel transistors Q₁ 565 and Q₂ 566. The impedance at this commonemitter point is relatively low and defined as Z_(i1). The second ACcurrent I_(i2) is provided to the common emitter point of paralleltransistors Q₃ 567 and Q₄ 568. The impedance at this emitter point isalso relatively low and defined as Z_(i2). These two sets of transistorsdefine parallel differential-pair variable-gain circuits with the firstAC current I_(i1) and the second AC current I_(i2) being subject to gaincontrol by the transistor pairs Q₁-Q₂ and Q₃-Q₄. The output AC currentsof the differential pair variable-gain circuits are AC-coupled to theoutput 520 by capacitors C₃ 575 and C₄ 580.

For large RF inputs, V_(z) 585 is low, the transistor Q₄ 568 is off. Thelarge RF input voltage causes a large current through resistor R₂ 530.At this input level, V_(y) 590 turns transistor Q₂ 566 partially on andQ₂ 566 delivers RF current to the output 520.

As the voltage on the input V_(i) 515 decreases, V_(y) 590 diverts morecurrent through transistor Q₂ 566 until it is fully on and transistor Q₁565 is off. As the input level at V_(i) 515 further decreases, V_(z) 585progressively turns on transistor Q₄ 568 to hold the output AC currentconstant as the input voltage peak decreases. The outputs from bothvariable-gain stages are summed as currents via capacitive coupling tothe output 520 of the first stage 510 and, in certain embodiments, fedto a fixed-gain, current amplifier.

The gain values of the variable-gain stages are controlled byvariable-gain control circuitry that adjusts these gain values relativeto voltage changes in the input signal (V_(i)) 515. This controlcircuitry and feedback loop will be discussed in greater detail laterwithin the disclosure.

FIG. 6 illustrates a fixed-gain, current amplifier 610 according tovarious embodiments of the invention. An input 615 receives a constantamplitude current from the variable-gain amplifier 510. This current isamplified by a particular constant gain so that it falls within anoptimum squaring region when provided to the squarer.

In various embodiments of the invention, the amplifier is a 2-stagedesign with a current feedback pair with a particular gain followed by asimple mirror gain. The mid-band current gain of the current feedbackpair of the transistor Q₅ 620 and the transistor Q₆ 625 is defined as:

$\frac{i_{c\; 6}}{i_{i}} = {1 + \frac{R_{5}}{R_{6}}}$

The input impedance at the transistor Q₅ 620 base is very low due to theshunt feedback, such that:

${Z_{i}} \approx \frac{{{R_{5} + \frac{1}{G_{m\; 6}}}}R_{6}}{G_{m\; 5}Z_{l\; 5}}$

where Z₁₅ is the load impedance seen by Q₅.

The feedback may be designed such that the capacitance from Q₅ collectorto ground is small resulting in a feedback gain, A₁, around theamplifier of:

${{A_{l} \approx {G_{m\; 5}Z_{l\; 5}\frac{G_{m\; 6}R_{e\; 6}}{1 + {G_{m\; 6}R_{e\; 6}}}}} = {1\mspace{14mu}{at}\mspace{14mu}{the}\mspace{14mu}{unity}\mspace{14mu}{gain}\mspace{14mu}{frequency}\mspace{14mu}{of}\mspace{14mu}{the}\mspace{11mu}{loop}\mspace{14mu}{{gain}.}}}\;$

The gain (i_(c6)/i_(i)) has a −3 dB frequency which is the unity gainfrequency of the loop gain. The current output from transistor Q₆ 625 isAC-coupled to the current mirror comprised of transistor Q₇ 630 andtransistor Q₈ 635. The output current 650 from transistor Q₈ 635 isAC-coupled, via coupling capacitor C₉ 640, to the squarer. This outputcurrent 650 has a fixed gain in relation to the input current 615 of theamplifier.

FIG. 7 illustrates a squarer 710 in accordance with various embodimentsof the invention. An input 715 on the squarer 710 receives the outputcurrent 650 from the current amplifier, squares this signal, andtransmits the squared signal on an output 720 having an AC-bypasscapacitor 725.

The squarer 710 has a preferred or optimum squaring region that definesa signal range at which it best functions. If the input signal fallsoutside of this range, then the squaring function may not accuratelysquare the signal or generate distortion of the squared output signal.For example, if the input current signal is larger than an upperboundary of this optimum squaring region, the squarer may saturate andclip an amplified signal therein.

The squaring function of the squarer 710 is defined by:

I_(c 9)I_(c 10) = I_(c 11)I_(c 12)${{such}\mspace{14mu}{that}},{I_{c\; 12} = {\frac{I_{c\; 9}^{2}}{I_{7}} = \frac{\left( {I_{6} + i_{c\; 8}} \right)^{2}}{I_{7}}}}$

where i_(c8) is the RF current in Q₈ and output current 650 from theamplifier 610. This output current 650 may be defined as:i _(c8) =I _(m) sin ωt

For illustrative purposes only, assume that the output current 650 has100 μA peak amplitude for sine wave input such that I_(m)=100 μA andthat I₆=I₇=200 μA. Accordingly, I_(c12) may be defined as

$I_{c\; 12} = {{200\mspace{20mu}\mu\; A} + {2i_{c\; 8}} + \frac{i_{c\; 8}^{2}}{200\mspace{20mu}\mu\; A}}$I_(c 12) = 200  μA + 200  μ A  sin  ω t + 50  μ A  sin²ω tI_(c 12) = 200  μ A + 200  μ A  sin   ω t + 25  μ A − 25  μ A  cos  2 ω t

One skilled in the art will recognize that the mean square signal inI_(c12) due to the RF input is 25 μA for i_(c8)=100 μA sin ωt and the DCbias is 200 μA. The RF components of the squared signal are removed by alarge external capacitor 725 in order to provide a constant DC outputvoltage. This output voltage 720 is forced to be equal to a knownreference voltage by the overall feedback loop operating though the RFvariable-gain amplifier, RF current amplifier and squarer.

One skilled in that art will recognize that with I₆=I₇=200 μA, the valueof I_(c12) from I_(c8)=100 μA sin ωt ranges from 450 μA to 50 μA.Additionally, the value of I_(c9)=I_(c10) ranges from 300 μA to 100 μA.The value of i_(c8) can range up to ±200 μA before overload occurs andtransistor Q₁₂ 740 saturates. This allows for true square law operationup to 2 times the peak sine wave voltage or 2.8 times the RMS sinevoltage of the input, which is equal to 9 dB above the RMS value. It isimportant to note that I₆ may be adjusted in order to improve the yieldon the squarer.

FIG. 8 is an exemplary variable-gain control loop according to variousembodiments of the invention. The variable-gain control loop 810provides feedback information to the variable-gain amplifier to controlthe gain applied on the RF input signal to force its output to aconstant. In certain embodiments of the invention, an input 815 in thecontrol loop 810 receives the averaged, squared signal from the RCcircuit so that a gain adjustment or adjustments may be generated by thecontrol loop.

The voltage on the input 815 is compared with a reference voltage 820 ontransistor Q₁₆ 822. This comparison generates a first control voltage825 on an output of a first amplifier 827. The comparison also generatesa second control voltage 830 on an output of a second amplifier 833. ADC reference voltage 836 at an output of a third amplifier 838 isapplied to the base of transistor Q₁ 565 in the variable-gain amplifier510. This DC reference 835 is also applied to the base of transistor Q₃567 in the variable-gain amplifier 510.

The first control voltage 825 ranges from zero volts when the transistorQ₂ 566, in the variable-gain amplifier 510, is off and to an uppervoltage value when Q₂ 566 is fully on and Q₁ 565 is off. The secondcontrol voltage 830 drives the base of the transistor Q₄ 568 and iscontrolled by the control loop with a delay caused by I₃₅ 835 until thefirst control voltage 825 is high.

The values of the first control voltage 825 and the second controlvoltage 830 will thus change in relation to amplitude changes on the RFsignal, which are effectively transferred through the RF variable-gainamplifier 510 and the squarer 710. These control voltages are coupled tothe RF variable-gain amplifier 510 in order to change its variable gainin a continual effort to force the output of the RF variable-gainamplifier to a constant value. This feedback control loop operates asfollows:

If the DC output voltage 815 of the squarer is not equal to thereference voltage 820, the circuitry of FIG. 8 generates appropriatecontrol voltages V_(y) 825 and V_(z) 830, which vary the gain of the RFvariable-gain amplifier such that the RF signal delivered to the squareris of the correct amplitude to force voltage 815 to equal voltage 820.Note that a 2-stage variable-gain amplifier is described to facilitatethe design of the circuit for very high-frequency input signals.However, a one-stage variable-gain amplifier could also be used in otherembodiments of the invention.

In various other embodiments of the invention, the first control voltage825, the second control voltage 830 and the DC reference voltage 835 arealso provided to the second variable-gain amplifier stage 270, such asthe matching DC variable-gain amplifier that is discussed later.

FIGS. 9A and 9B illustrate exemplary circuit designs for current sourcesthat may be implemented within the RF variable-gain amplifier discussedin FIG. 5. Referring to FIG. 9A, a voltage source (V_(cc)) 915 iscoupled to a plurality of MOS transistors (M₁₀-M₁₅) that are coupledthrough another set of MOS transistors (M₁₆-M₁₈). A first amplifier 920is coupled to an output of this set of MOS transistors (M₁₆-M₁₈) andreceives current I₁₁ 925 such that is drives an output 930 on theoperational amplifier 920.

This output 930 is coupled to the base of transistor Q₁₈ 940, whichgenerates a current in the transistor collector 950. This collector 950is coupled to the emitters on transistor Q₃ 567 and transistor Q₄ 568 toprovide a current source thereto resulting in current source I₁ 545. Theamount of current delivered to these transistors is determined by afirst resistor R₂₀ 946 and a second resistor R₂₁ 947, which effectivelydetermine the voltage on the inputs of the first amplifier 920. Thecurrent delivered to the collector of transistor Q₁₈ 940 is set by thecurrent I₁₁ 925 and the two resistors 946, 947.

FIG. 9B illustrates a fixed current source 955 according to variousembodiments of the invention. In certain embodiments, this currentsource 955 biases the low-gain variable-gain amplifier path. As shown inthis figure, the amount of current delivered by the current source maybe changed by adjusting the resistors, which in turn changes the amountof current delivered into the amplifier.

In various embodiments of the invention, the resistance of R₂₂ 965defines the voltage applied to amplifier (OA1) 970. The amplifier 970outputs a signal to the base of transistor Q₁₉ 975 that has its emittercoupled to resistor R₂₃ 985. An output current 980 is provided on thecollector of the transistor Q₁₉ 975 and provided to emitter oftransistor Q₁ 565 and the emitter of transistor Q₂ 566 resulting incurrent source I₂ 550.

If the amount of current on I₂ 550 is larger than I₁ 545, then anincrease in linearity margin is achieved in the high-gain path where thedrive impedance at the emitters on transistor Q₃ 567 and transistor Q₄568 is smaller for I₂ when compared to the impedance at the emitters ontransistor Q₁ 565 and transistor Q₂ 566 for I₁.

FIG. 10 illustrates a DC variable-gain amplifier in accordance withvarious embodiments of the invention. The DC variable-gain amplifier1005 receives a gain adjustment signal from the feedback loop previouslydiscussed. This gain adjustment signal adjusts the gain across the DCvariable-gain amplifier 1005 in relation to the voltage on the incomingRF signal to the detector.

The DC variable-gain amplifier 1005 receives DC current from transistorQ₂₄ 1140 and transistor Q₂₆ 1145, both of which will be described in thedisclosure of the DC buffer 1110. These currents from Q₂₄ 1140 and Q₂₆1145 are steered by V_(x), V_(y), and V_(z), as previously discussed,and match the RF variable-gain amplifier current sources with theexception that there is not a DC bias on the current within the DCvariable-gain amplifier 1005.

A first transistor differential pair, comprising Q₃₁ 1010 and Q₃₂ 1015,and a second transistor differential pair, Q₄₀ 1020 and Q₄₁ 1025, directthe received signal to a current minor. In various embodiments of theinvention, the current minor comprises Q₃₃ 1030, Q₃₄ 1035, Q₃₅ 1040, andQ₃₆ 1045, as shown within FIG. 10. The current signal then passes toanother minor Q₃₈ 1070, Q₃₇ 1065 and Q₃₉ 1060 which provides currentgain.

The amplified signal at the collector node 1050 of Q₃₉ 1060 is then fedto a DC buffer. This forms a feedback loop that forces Q₃₉ 1060 tooperate at a constant current that matches the rectified DC output 720of the squarer 710.

FIG. 11 is a DC buffer 1110 according to various embodiments of theinvention. In various embodiments of the invention, the DC buffer atleast partially functions as the first gain block 355 and is positionedwithin a feedback loop to the DC variable-gain amplifier 375.

A DC voltage 1115 is generated at the base of transistor Q₂₃ 1130 byconnecting the collector of transistor Q₃₉ 1050 to a resistor which inturn is connected to V_(cc). A high-gain differential amplifier,consisting of transistors Q₂₂ 1135 and Q₂₃ 1130, compares the voltage1115 and the voltage at the base 1120 of transistor Q₂₂ 1135 which isconnected to the output 720 of the squarer. The high-gain differentialamplifier forces these two voltages to be equal by feeding back currentto the base of transistor Q₂₃ 1130 via the DC variable-gain amplifier1005. When equilibrium is reached, the voltage fed back to the base oftransistor Q₂₃ 1130 is equal to the amount of voltage from the squarerdelivered to the base of the transistor Q₂₂ 1135.

The output from the differential amplifier controls the current comingout of the collector 1150 of transistor Q₂₄ 1140 and the collector 1155of transistor Q₂₆ 1145. These currents are used as inputs into the DCvariable-gain amplifier 1005, and match the RF current feeds into the RFvariable-gain amplifier 510. Accordingly, in certain embodiments of theinvention, the current in transistor Q₂₄ 1140 will be a fraction of thecurrent in transistor Q₂₆ 1145 set by transistor area ratios between Q₂₄and Q₂₆.

Transistor Q₃₀ 1160 taps the true RMS signal and feeds this tappedsignal on output 1165 to a log amplifier that is discussed later. Thistapped current is within a current range that corresponds to the voltagerange on the RF input V_(i) 515.

FIG. 12 is a circuit diagram of a logarithmic amplifier according tovarious embodiments of the invention. The logarithmic amplifier 1205provides a dB linear output in relation to the current on the collectorof transistor Q₃₀ 1160.

The current from the collector of transistor Q₃₀ 1160 is provided atnode 1210 that feeds transistor Q₄₂ 1215, which functions as a diode. Afirst reference current I₁₄ 1220 is provided on the collector oftransistor Q₄₃ 1235, which functions as a diode. A second referencecurrent I₁₅ 1225 is provided to the collector of transistor Q₄₄ 1240 anda third reference current I₁₆ 1230 is provided to the collector oftransistor Q₄₅ 1245.

A differential output (V) 1250 is generated as the difference in voltageacross Q₄₂ 1215 and Q₄₃ 1235. This voltage is given by:Differential Voltage=V _(T)*ln(I _(C42) /I _(C43))

where V_(T)=kT/q

This differential voltage 1250 is yielded with a PTAT dependence and isbuffered by transistors Q₄₄ 1240 and Q₄₅ 1245. The output 1260 of theamplifier is a DC current from the buffered differential voltage 1250and provided to an output buffer.

FIG. 13 illustrates a circuit of an output buffer in accordance ofvarious embodiments of invention. The PTAT dependency of the output 1260of the amplifier is removed in the output buffer 1310. The current fromthe output 1260 from the logarithmic amplifier 1205 is provided on input1312 on an amplifier 1314.

The current relationships through transistors Q₄₈ 1315, Q₄₉ 1320, Q₅₀1325, Q₅₂ 1340, and reference currents I₁₇ 1330 and I₁₈ 1335 may bedefined as follows:

${\frac{I_{c\; 48}}{I_{s\; 48}}\frac{I_{c\; 49}}{I_{s\; 49}}} = {\frac{I_{c\; 50}}{I_{s\; 50}}\frac{I_{c\; 52}}{I_{s\; 52}}}$

resulting in:

$I_{c\; 52} = {\frac{I_{c\; 48}I_{17}}{I_{18}}\frac{I_{s\; 50}I_{s\; 52}}{I_{s\; 48}I_{s\; 49}}}$and: $I_{c\; 52} = {4I_{c\; 48}\frac{I_{{ref}\; 2}}{I_{PTAT}}}$

The output voltage V_(o) 1360 is equal to the current on the collectorof Q₅₃ 1350 multiplied by the resistance of R₃₆ multiplied by the gainof the amplifier 1365.

The embodiments of the RMS detector described above use voltagecomparison at the output of the squarer. However, this comparison canalso be made using currents as the comparison variables. FIG. 14 is aschematic of an RMS detector according to various embodiments of theinvention. When compared to the RMS detector illustrated in FIGS. 3A and3B, the RMS detector 1410 illustrated in FIG. 14 shows a current-basedcircuit that also generates an RMS measure of an RF input signal as avoltage output signal.

An input signal 1415 is received at an RF variable-gain amplifier 1420that applies a variable-gain on the input signal 1415 that forces anoutput current (I₀₁) 1425 to be constant. As the voltage (V_(i)) on theinput signal 1415 changes, the gain across the RF variable-gainamplifier 1420 will change in response thereto. The gain (K₁) across theRF variable-gain amplifier 1420 may be calculated as I₀₁/V_(i) andchanges relative to V_(i) as I₀₁ is forced constant.

This output current (I₀₁) 1425 is received at a high-frequency currentamplifier 1430 that applies a gain to the output current (I₀₁) 1425 andgenerates an amplified current (I₀₂) 1435. The gain (K₂) of the HFcurrent amplifier 1430 may be calculated as I₀₂/I₀₁.

The amplified current (I₀₂) 1435 is provided to a squarer 1440 thatperforms a squaring operation. Because the output current (I₀₁) 1425 onthe RF variable-gain amplifier 1420 is constant or approximatelyconstant, the range of the amplitude of the amplified current (I₀₂) 1435of the squarer 1440 is significantly reduced over the range of RF inputsignal amplitudes at V_(i) 1415, which allows the squarer to alwaysoperate within its ideal squaring region. The squared current output(I₀₃) is generated by the conversion gain on amplified current (I₀₂)1435.

The capacitor 1455 averages the signal at 1454 over a period of time. Invarious embodiments of the invention, the averaged, squared current ofoutput (I₀₃) is compared with a reference current I₃₆ 1445 by avariable-gain amplifier control circuit. This reference current may begenerated on or off-chip. The variable-gain amplifier control circuitoutputs a signal on a feedback loop that forces the mean squared currentoutput (I₀₃) to be equal or approximately equal to a reference currentI₃₆ 1445. This relationship may be defined as:I _(o3)= (K ₁ K ₂ {overscore (V)} _(i))² ×K ₃ =I _(ref 1)

from which:

$K_{1} = {\frac{1}{K_{2}\sqrt{\overset{\_}{V_{i}^{2}}}}\sqrt{\frac{I_{{ref}\; 1}}{K_{3}}}}$

where I₃₆=I_(ref1), K₁ is the transconductance of the variable-gainamplifier, K₂ is the current gain of the current amplifier and K₃ is theconversion current gain of the squarer.

Additionally, the output DC voltage 1454 on the squarer 1440 is forcedto a reference voltage V_(ref) 1462, which in certain embodiments isequal to V_(BE). The feedback loop includes a first gain adjustmentsignal that adjusts the gain across the RF variable-gain amplifier 1420so that the mean squared current output (I₀₃) is forced to be equal orapproximately equal to the reference current.

A second gain adjustment signal changes the gain across a DCvariable-gain amplifier that generates output current (I₀₄). This secondgain adjustment relates to the output of the variable-gain amplifiercontrol circuit, which was previously discussed, and changes a gainvalue on the DC variable-gain amplifier, which is at least in-partrelated to changes in the input signal (V_(i)). The output current (I₀₄)is provided to a DC current buffer having a current gain set at unityand generates a buffered output current. The buffered output current(I₀₄) 1482 is forced to be equal to a second reference current,I_(ref2)=I₄₅ 1484, by changing the gain across the DC variable-gainamplifier. In various embodiments of the invention, the current gainacross the DC variable-gain amplifier varies within a particular rangeand tracks the RF gain (K₁) of the RF variable-gain amplifier.

The buffered output signal (I₀₄) is provided on a first input of a DCbuffer circuit and a reference voltage is provided on a second input ofthe DC buffer circuit. The DC buffer circuit generates a primary output(I₀₆) that relates to the RMS voltage of the input signal (V_(i)) andsecondary output (I₀₅) that is provided on an input to the DCvariable-gain amplifier. The secondary output (I₀₅) relates to bufferedoutput signal (I₀₄) based on the gain (K₁) across the RF variable-gainamplifier and a parameter, R_(x), set by the ratio between the gains ofthe RF and DC variable-gain amplifiers.

$\frac{I_{o\; 4}}{I_{o\; 5}} = {K_{1}R_{x}}$

In certain embodiments, R_(x) is equal to 5KΩ and the primary output(I₀₆) is defined as:I _(o6)=4I _(o5)

which results in the primary output (I₀₆) being equal to:

$I_{o\; 6} = {\frac{4I_{o\; 4}}{K_{1}R_{x}} = \frac{4I_{{ref}\; 2}}{K_{1}R_{x}}}$

Using the above-definition of the gain (K₁) across the RF variable-gainamplifier, the primary output (I₀₆) on the DC buffer relates to the RMSvoltage on (V_(i)) and is equal to:

$I_{o\; 6} = {\frac{4I_{{ref}\; 2}}{R_{x}}K_{2}\sqrt{\frac{K_{3}}{I_{{ref}\; 1}}}\sqrt{\overset{\_}{V_{i}^{2}}\;}}$

In certain embodiments, the transfer function from √{square root over (V_(i) ² to the primary output (I₀₆) may be specified if the coefficientsin the above equation have precise values. Accordingly, the true RMSvoltage of the inputs signal (V_(i)) may be extracted from the primaryoutput (I₀₆) by the application of a scalar. The primary output (I₀₆) issupplied to a logarithmic amplifier and an output buffer.

In certain embodiments, an RF variable-gain amplifier shown in FIG. 5may be used within the current-based RMS detector. Additionally, incertain embodiments, a fixed-gain amplifier shown in FIG. 6 may be usedin the current-based RMS detector.

FIG. 15 illustrates a current squarer according to various embodimentsof the invention. An input signal is provided on input 1505. Thesquaring function of the squarer is defined by a relationship betweenthe current through transistors Q₉ 1520, Q₁₀ 1525, Q₁₁ 1535, and Q₁₂1530:

I_(c 9)I_(c 10) = I_(c 11)I_(c 12)${{such}\mspace{14mu}{that}},{I_{c\; 12} = \frac{I_{i}^{2}}{I_{c\; 83}}}$

where I_(i)=I_(c79)+i_(c83) and i_(c83) is the RF AC current in Q₈ 635and the output current 650 from the fixed-gain amplifier 610. CurrentI₃₆ 1540 is a reference current. DC currents are defined through Q₇₉,Q₈₀ and Q₈₁, the values of which are at least partially defined byresistors R₄₃, R₄₄ and R₄₅.

The current through Q₁₂ is defined by the input squared over the currentthrough Q₈₃, which is a constant current source. The amplifier 1545forces a precise DC bias current in Q₈₃. The RF components of thesquared signal are removed by a large external capacitor 1585 in orderto provide a constant DC output voltage.

The foregoing description of the invention has been described forpurposes of clarity and understanding. It is not intended to limit theinvention to the precise form disclosed. Various modifications may bepossible within the scope and equivalence of the appended claims.

1. A DC variable-gain amplifier stage that produces an RMS value relatedto an RF signal, the DC variable-gain stage comprising: a variable-gaininput coupled to receive a gain adjustment signal that adjusts a gainacross a DC variable-gain amplifier, coupled within the DC variable-gainstage, in relation to averaged, squared values of voltage changes on theRF signal; a feedback loop, coupled across the DC variable-gainamplifier, that forces an output of the DC variable-gain amplifier and areference voltage to be equal; and a comparator, coupled within thefeedback loop, that receives the output of the DC variable-gainamplifier and the reference voltage and generates an RMS output relatedto an RMS value of the RF signal.
 2. The DC variable-gain amplifierstage of claim 1 further comprising an amplifier, coupled to receive theRMS output, that applies a gain to the RMS output to generate a true RMSvalue of the RF signal.
 3. The DC variable-gain amplifier stage of claim2 wherein the feedback loop provides an input signal on the DCvariable-gain amplifier.
 4. The DC variable-gain amplifier stage ofclaim 2 wherein the gain applied to the RMS output relates to a scalarbetween the reference voltage and the averaged, squared values ofvoltage changes on the RF signal.
 5. The DC variable-gain amplifierstage of claim 1 further comprising a logarithmic amplifier, coupled toreceive the RMS output, that converts the RMS output into a dB value. 6.An RF variable-gain amplifier comprising; an input that receives an RFsignal; a first differential pair variable-gain circuit, coupled to theinput, that provides a first gain path through the RF variable-gainamplifier, a second differential pair variable-gain circuit, coupled tothe input, that provides a second gain path through the RF variable-gainamplifier; a gain interface that receives a gain adjustment signal thatdefines a total gain across the first and second gain paths, the gainadjustment signal being generated at least partially by an averaged,squared signal generated from the RF signal; and an output that forces aconstant output value based on the gain adjustment signal.
 7. The RFvariable-gain amplifier of claim 6 wherein the output is coupled to asquarer that squares the output.
 8. The RF variable-gain amplifier ofclaim 6 wherein the first gain path is active when a voltage level onthe RF signal is low and the second gain path is active when the voltagelevel on the RF signal is high.